package com.pbd.shared;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.google.gwt.user.client.rpc.IsSerializable;

@Entity
@Table(name="albummaster")
public class ALBUMMASTER implements IsSerializable,Serializable{

	public ALBUMMASTER(){
		
	}
	@Id
	@GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
	@Column(name = "albumId")
	private Long albumId;
	
	@Column(name = "albumCode", nullable = false, length = 30)
	private String albumCode;
	
	@Column(name = "albumTitle", nullable = false, length = 50)
	private String albumTitle;
	
	@Column(name = "albumDesc", nullable = false, length = 255)
	private String albumDesc;
	
	@Column(name = "createddate")
	private java.util.Date createdDate;
	
	@Column(name = "albumIndex")
	private java.lang.Integer albumIndex;
	

	@Column(name = "layout", nullable = false, length = 50)
	private String layout;
	
	
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "partyId", insertable = true, updatable = true)
	private PARTY party;


	@OneToMany(cascade = CascadeType.ALL,fetch=FetchType.EAGER)
	@JoinColumn(name = "albumId")
	private Set<MEDIARELATION> albumMediaRelation = new HashSet<MEDIARELATION>();
	
	public Long getAlbumId() {
		return albumId;
	}
	public void setAlbumId(Long albumId) {
		this.albumId = albumId;
	}
	public String getAlbumCode() {
		return albumCode;
	}
	public void setAlbumCode(String albumCode) {
		this.albumCode = albumCode;
	}
	public String getAlbumDesc() {
		return albumDesc;
	}
	public void setAlbumDesc(String albumDesc) {
		this.albumDesc = albumDesc;
	}
	public java.util.Date getCreatedDate() {
		return createdDate;
	}
	public void setCreatedDate(java.util.Date createdDate) {
		this.createdDate = createdDate;
	}
	public String getAlbumTitle() {
		return albumTitle;
	}
	public void setAlbumTitle(String albumTitle) {
		this.albumTitle = albumTitle;
	}
	public Set<MEDIARELATION> getAlbumMediaRelation() {
		return albumMediaRelation;
	}
	public void setAlbumMediaRelation(Set<MEDIARELATION> albumMediaRelation) {
		this.albumMediaRelation = albumMediaRelation;
	}
	public PARTY getParty() {
		return party;
	}
	public void setParty(PARTY party) {
		this.party = party;
	}
	public java.lang.Integer getAlbumIndex() {
		return albumIndex;
	}
	public void setAlbumIndex(java.lang.Integer albumIndex) {
		this.albumIndex = albumIndex;
	}
	
	public String getLayout() {
		return layout;
	}

	public void setLayout(String layout) {
		this.layout = layout;
	}

}
